home *** CD-ROM | disk | FTP | other *** search
- -- card: 64640 from stack: in
- -- bmap block id: 0
- -- flags: 0000
- -- background id: 4507
- -- name:
-
-
- -- part 2 (button)
- -- low flags: 00
- -- high flags: 8004
- -- rect: left=410 top=88 right=109 bottom=488
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Example 1
- ----- HyperTalk script -----
- on mouseUp
- --An example of a REPEAT control structure
- repeat until the shiftKey is down
- put "The time is:" && the long time & ". Press the Shift key to see the script."
- end repeat
- edit script of card button "example 1" --so you can see the script
- end mouseUp
-
-
-
- -- part 3 (button)
- -- low flags: 00
- -- high flags: 8004
- -- rect: left=412 top=266 right=287 bottom=488
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Example 2
- ----- HyperTalk script -----
- on mouseUp
- --An example of a REPEAT control structure
- put 0 into x
- repeat
- add 1 to x
- if the shiftKey is down then exit repeat
- if (x MOD 10) > 4 then next repeat
- put "Numbers ending in 0,1,2,3, or 4:" && x & ". Press Shift key to stop"
- end repeat
- edit script of card button "example 2" --so you can see the script
- end mouseUp
-
-
-
- -- part contents for background part 1
- ----- text -----
- repeat until <true or false expression>
- <command>
- <command>
- end repeat
-
- repeat 20
- <command>
- if x > 3 then next repeat -- skip the rest and start
- <command> -- the next cycle of the loop
-
- if x > 43 then exit repeat -- leave the loop early
- <command>
- end repeat
-
-
-
- -- part contents for background part 2
- ----- text -----
- Other control structures (cont.)
-
- -- part contents for background part 44
- ----- text -----
- repeat until
-
-
-
-
- repeat
-
- next repeat
-
-
- exit repeat
-
- -- part contents for background part 43
- ----- text -----
- 267,189